#!/usr/bin/env python

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(from_string = 'Polarizable embedding energy contributions:',
      num_lines = 16,
      abs_tolerance = 1.0e-5)
f.add(from_string = 'Dipole moment components',
      num_lines = 8,
      abs_tolerance = 1.0e-4)
f.add(from_string = 'Electric transition dipole moments (au)',
      ignore_sign = True,
      num_lines = 9,
      rel_tolerance = 1.0e-4)

test.run(['pemcscf_1.dal', 'pemcscf_2.dal', 'pemcscf_3.dal'], ['formaldehyde.mol'], ['2h2o.pot'], f={'out': f},
         accepted_errors = ["not implemented for parallel calculations"])

sys.exit(test.return_code)
